<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>管理界面</title>
</head>
<body>
{{ today }} 打印订单
<br>
当前登录用户：{{ current_user.Tel_Number }}
<br>
<h1>原版</h1>
<form action="{{ url_for('printer.query') }}" method="get">
    {{ query_form.hidden_tag() }}
    {{ query_form.tel_number.label }}
    {{ query_form.tel_number }}
    <br>
    {{ query_form.date_time.label }}
    {{ query_form.date_time(type="date") }}
    <br>
    {{ query_form.submit }}
</form>
<table>
    <thead>
    <tr>
        <th>文件名</th>
        <th>份数</th>
        <th>方向</th>
        <th>单彩</th>
        <th>方式</th>
        <th>状态</th>
        <th>订单号</th>
        {#        <th>预览</th>#}
    </tr>
    </thead>
    <tbody>
    {% for info in infos %}
        {% if info.Born_Date_Day == today %}
            <tr>
                <td style="text-align: center">
                    {% if info.File_Dir[-3:] == "pdf" %}
                        <a href='#' onclick="window.open('look/viewer.html?file=../../static/Upload_Files/{{ info.File_Dir }}','PDF','width:50%;height:50%;top:100;left:100;');">
                            {{ info.File_Name[:-4] }}{{ info.File_Dir[-4:] }}
                        </a>
                    {% endif %}
                    {% if info.File_Dir[-3:] != "pdf" %}
                        <a href="../static/Upload_Files/{{ info.File_Dir }}">
                            {{ info.File_Name[:-4] }}{{ info.File_Dir[-4:] }}
                        </a>
                    {% endif %}
                </td>
                <td style="text-align: center">{{ info.Print_Copies }}</td>
                <td style="text-align: center">
                    {% if info.Print_Direction == 3 %}
                        <p>纵向</p>
                    {% endif %}
                    {% if info.Print_Direction == 4 %}
                        <p>横向</p>
                    {% endif %}
                </td>
                <td style="text-align: center">
                    {% if info.Print_Colour == 'mono' %}
                        <p>黑白</p>
                    {% endif %}
                    {% if info.Print_Colour == 'color' %}
                        <p>彩色</p>
                    {% endif %}
                </td>
                <td style="text-align: center">
                    {% if info.Print_way == 'one-sided' %}
                        <p>单面</p>
                    {% endif %}
                    {% if info.Print_way == 'two-sided-long-edge' %}
                        <p>双面长边</p>
                    {% endif %}
                    {% if info.Print_way == 'two-sided-short-edge' %}
                        <p>双面短边</p>
                    {% endif %}
                </td>

                <td style="text-align: center">
                    {% if info.Print_Status == 0 %}
                        <p>未支付</p>
                    {% endif %}
                    {% if info.Print_Status == 1 %}
                        <p>已支付</p>
                    {% endif %}
                    {% if info.Print_Status == 2 %}
                        <p>正在打印</p>
                    {% endif %}
                    {% if info.Print_Status == 3 %}
                        <p>打印结束/p>
                    {% endif %}
                </td>
                <td style="text-align: center">{{ info.Trade_Number }}</td>
            </tr>
        {% endif %}
    {% endfor %}
    </tbody>
</table>



{% from "bootstrap/pagination.html" import render_pagination %}
{% if pagination %}
<div class="page-footer">{{ render_pagination(pagination) }}</div>
{% endif %}

</body>
</html>